import axios from 'axios'

let error = console.error

const api = '/brands/'

export default function listBrands (cb, fcb = () => error('listBrands')) {
  axios.get(api).then(res => {
    let data = res.data
    cb(data)
  }).catch(error => {
    fcb(error)
  })
}
